Auto-adaptive jitter buffer

ABSTRACT

The present invention concerns a method to buffer a data stream at its reception. The method is performed by a receiver of said data stream. Latter sent by a sender is transferred over a connection-less network in packets encapsulated into frames. The method of buffering itself comprises the steps of storing said packets into a buffer of a specific size (B s ). When said receiver received at least one of said packets, its delay (jitter) is measured and compared with some predefined value. Depending on the result of that comparison, said buffer size (B s ) will be adopted dynamically such to optimize said transfer of said packets according to some predefined criteria.

[0001] The present invention relates to a method of buffering a datastream at its reception as set forth in the preamble of claim 1.

[0002] In a circuit switching network as actual telephony network, everyconnection is set-up by blocking a single channel or fixing somebandwidth per connection. Such channel will be release as soon as theusers decide to terminate the call. Due to the reservation of bandwidthduring the complete call, the quality of the call is predictable. Butthis type of network has also disadvantages. At first, every connectionmust be set-up which consumes time and resources. Secondly, everyconnection has a fixed bandwidth allocated (usually 64 kbps). A user cannot ask for more or less bandwidth. Even during silence periods, theresources are used completely. Further unused circuit are unusedcapacity. Circuit switching does not provide easily the capability tofill this unused capacity with elastic traffic.

[0003] All these explains, among others, the interest to use internetprotocol (IP) networks to perform usual telecommunications connections.There, no connection must be set-up. Such networks are therefore calledconnection-less or packet-switched networks. No resources are allocatedand connectivity is already provided by IP. In that case the data (audiolike voice or video messages) are transferred over that network as datastream made of packets encapsulated into frames. The packets will mostlyfollow different routes through the network, what will result indifferent not necessarily predictable delays (jitter delay) betweenthem. Furthermore, the time taken to insert these packets into a network(time access) will vary a lot according to how busy this network willbe. This is in fact the main cause of jitter delay. It may even varysubstantially during a same telecommunications. This delay is intrinsicto the technology used like e.g. in a LAN ethernet the Carrier SenseMultiple Access/Collision Detect.

[0004] Voice over IP (VoIP) is a typical application using such networkand requesting a high level of quality of service (QoS). A real timecommunications between a sender and a receiver will then be possibleonly if such requirement of QoS will be fulfilled. Therefore, it iscrucial to control and minimize all delays occurring on such a network.This is obtain among other by storing at the receiver some amount ofreceived data in a buffer before restituting it (timestamp-delittering).In such a way it is possible to rebuild the data stream with the samesequence of packets as when the data stream left the sender.

[0005] The delays occurring on a packet-switched network are mostly oftwo nature, one fixed due to the speed of the stream on that network,and the other variable (jitter) due to the chosen path and mostly to theamount of the already present traffic in that network. Since latter canchange a lot from a communication to another or even during acommunication e.g. due to some overload of the network at some specialhours of the day, it is of interest to adapt some characteristics of theused buffer to the circumstances.

[0006] In WO97/39409 is disclosed a communications system utilizing abuffer of variable size. That invention is developed in the field ofnative processing environment modems such to permit to adapt thesoftware controlling the modem to the constraints of changing standards(e.g. V.32 and V.34). Two different buffer sizes are available. Thechoice is made according to the latency time period desired. There,small buffers will provide the communication system with short andaccurate response times. On the other hand, increasing the buffer sizewill make the modem processing more robust, reducing the implementationoverhead, making it more resistant to operating system latencies andgiving it greater flexibility in the exact time within the time slicei.e. between interruptions occurring during processing withoutnecessarily disturbing the transferred data stream.

[0007] The available sizes for the buffer are already predefined inWO97/39409. Therefore, the choice of the buffer size is very restrictedin fact to only two values. Furthermore, the switching from one buffersize to the other one is performed in a fixed manner at some definitetime identical for all communications. This method is absolutely notadequate if high QoS is demanded for a transfer of data stream on apacket-switched network where the delay (jitter) of each packet sentthrough it may be different and not predictable.

[0008] It is an object of the present invention to optimize thereception quality in a connection-less network such that real timetelecommunications with a very high QoS are possible.

[0009] This object is attained, according to the invention, by a methodof buffering a data stream at its reception as claimed in claim 1.

[0010] To overcome the problem of the non-predictable delay taken by thepackets when inserted into a packet-switched network and transferredover one almost randomly chosen path of that network, it is of greatadvantage to store temporarily part of the data stream at its receptionon the receiver. This is performed using a buffer of specific size wherethe packets will be store and classified in the right order. Indeed, thedelay taken by different packets can be so different that some packetsmay reach the receiver before other packets sent first by the sender.

[0011] The size of that buffer must be chosen such that it is big enoughto permit to rebuild at the receiver the same data stream as the oneleaving the sender. On the other hand, this buffer size must be kept assmall as possible so not to provoke any audible scrambling or chopping.Advantageously, the method according to the invention comprises thesteps of measuring regularly the delay (jitter) of at least one packetwhen reaching the receiver. Afterwards, said measured delay is comparedin some way with a predefined delay obtained e.g. by some averagedestimation of the time taken by several packets for the transfer on thatnetwork. And finally, the result of that comparison is used to adaptregularly the buffer size. If, for example, the measured delay is muchbigger than the estimated one, it will be a hint that with such to smallbuffer some packets will get lost. Therefore, the method according tothe present invention comprises the step of taking an action onto thesize of the buffer i.e. in that case the possibility to increase thatbuffer size. On the other hand, if the measured delay is much smallerthan the estimated one, it will be a hint that the buffer size has to bereduced increasing then also the QoS of the performed telecommunicationsover such packet-switched network.

[0012] An embodiment of said method of buffering according to thepresent invention is characterized in that the action on the buffer sizeis taking following some predefined criteria. Latter consists of severaldifferent cases to which the result of the performed comparison shall beaffected according to its value, and which will imply a change or not ofthe buffer size. Such step is advantageously applied regularly so toprovide a dynamic adaptation (auto-adaptive) of the buffer size to thepresent circumstances of the network. The different sizes of the bufferare not predefined but rather completely variable and limited at last bythe unity used for storing said data into said buffer.

[0013] Further advantageous features of the invention are defined in thedependent claims and will become apparent from the following descriptionand the drawing.

[0014] One embodiment of the invention will now be explained in moredetail with reference to the accompanying drawing, in which:

[0015]FIG. 1 is a flow chart showing steps of a method of buffering adata stream at its reception according to the invention.

[0016] The present invention concerns a method to buffer a data streamat its reception.

[0017] The method is performed by a receiver of said data stream. Lattersent by a sender is transferred over a connection-less network(packet-switched network) in packets encapsulated into frames. Themethod of buffering itself comprises the steps of storing said packetsinto a buffer of a specific size (B_(s)).

[0018] When said receiver received at least one of said packets, itsdelay (jitter) is measured and compared with some predefined value.Depending on the result of that comparison, said buffer size (B_(s))will be adapted dynamically such to optimize said transfer of saidpackets according to some predefined criteria specified later on in thisdescription.

[0019] The step concerning said comparison can be performed in differentways. In a preferred embodiment of the present invention a measured timedifference ΔT between the real time and the expected one for saidtransfer of said packet is compared with a maximum admissible timedifference Δ_(M) which corresponds to said buffer size B_(s).

[0020] The received packets or frames are then classified relatively tothe result of said comparison according to some predefined criteria suchto weight said different cases C_(i) relatively to the number of time aresult of said comparison was affected to one of said cases. Thepredefined criteria consist of at least three different cases. A firstone (i) corresponding to the situation that said measured timedifference ΔT is noticeably less then said maximum admissible timeΔ_(M), a second one (ii) corresponding to the situation that both are ofsame amplitude, and a third one (iii) corresponding to the situationthat said measured time difference ΔT is noticeably greater then saidmaximum admissible time Δ_(M).

[0021] In a further embodiment said predefined criteria consists of fourcases. There is a supplementary case when the measured time differenceΔT is a little less then said maximum admissible time Δ_(M). Thedifferent predefined cases are then defined as follow:

[0022] 1. ΔT<<Δ_(M)

[0023] 2. ΔT<Δ_(M)

[0024] 3. ΔT˜Δ_(M)

[0025] 4. ΔT>Δ_(M)

[0026] For practicability, two coefficients are introduced Δ₁ and Δ₂such to clearly defined the four above cases to which are respectivelyaffected four comparators with four counters C₁, C₂, C₃, and C₄ in thefollowing way:

[0027] 1. ΔT<Δ₁→C₁

[0028] 2. Δ₁<ΔT<Δ₂→C₂

[0029] 3. Δ₂<ΔT<Δ_(M)→C₃

[0030] 4. ΔT>Δ_(M)→C₄

[0031] These two coefficients Δ₁ and Δ₂ are defined such that Δ₁ isnoticeably less then said maximum admissible time Δ_(M) (Δ₁<<Δ_(M)), andΔ₂ is only little less then said maximum admissible time Δ_(M)(Δ₂<Δ_(M)). The counters C₁ to C₄ are used to count the number ofpackets (weight) affected to each of these four cases.

[0032] To each of these four comparators is defined a thresholdparameter respectively S₁, S₂, S₃ and S₄. They are used to define when astep of taking an action will be activated. Typically, when the counterC₁ exceeds the value S₁, then the buffer size B_(s) (Δ_(M)) will bereduced of some amount.

[0033] If the counter C₂ exceeds the value S₂, then a check is performedof a possible time-lag between the sender and the receiver. An increaseof the fixed delay for any transmission may be agreed between them. Aresynchronization of the clock of both sender and receiver are performedsuch that in a same interval of time, a same amount of data is at leastapproximately transmitted by said sender as received by said receiver.Usually the clock of the sender will be taken as the reference andtherefore, it is the clock of the receiver which must be adapted to theformer.

[0034] In the third case when the counter C₃ exceeds the threshold S₃,the buffer size B_(s) is increased. The same action may be taken in thefourth case when the counter C₄ will exceed the threshold S₄. These twolast cases are not redundant since in the fourth case, a non nullcounter C₄ is tolerated. Therefore a percentage of lost of data will beaccepted when the packets are stored or gathered into the buffer. Thisis not the case in the third one, since that counter C₃ counts thenumber of packets or frames stored in the buffer till its completelyfullness but without any loss.

[0035] On FIG. 1 is shown a flow chart that depicts an example of themethod of buffering a data stream at its reception according to theinvention. Such kind of procedure is implemented on the receiver side.The method starts when the receiver received a frame or packet out ofthe data stream sent by the sender, and stores or gathers it into abuffer. At first, the measured time difference ΔT between the real timeand the expected one for said transfer of said packet is calculated 1.Afterwards, a drift or difference between said value ΔT and the maximumadmissible time difference Δ_(M) is obtained 2. It is immediatelyfollowed by an up to date 3 of the counters C₁ till C₄ i.e. mostprobably the counter corresponding to the case obtained will beincremented by one (weighting).

[0036] Then, a first comparison is performed 4 between the counter C₄and its threshold to test if C₄ exceeds S₄. If it is the case, then thebuffer size B_(s) is increased 6 and the procedure is terminated 20. Inthe other case, a second comparison 5 is performed between the counterC₃ and its threshold S₃ and a similar action is taken as before if C₃exceeds S₃.

[0037] If it is not the case, then a third comparison 7 is performedbetween the counter C₁ and its threshold S₁. If C₁ exceeds S₁, then thistime the buffer size B_(s) is diminished 8 and the procedure isterminated 20. In the other case, it is checked 9 if the drift ordifference between said value ΔT and the maximum admissible timedifference Δ_(M) is bigger then a packet or frame. If yes, then aresynchronization of the clock of both sender and receiver are performed10 such to improve the communication between the sender and the receiverand the procedure is terminated 20.

[0038] If the check at step 9 was not successful, then it is checked howmany frames or packets where already treated 11. If more then somepredefined value N_(max) were already treated then the procedure isterminated 20. If not then a supplementary comparison 12 is made betweenthe counter C₂ and its threshold S₂. If that counter C₂ exceeds S₂ thenit is checked 13 if the drift or difference between said value ΔT andthe maximum admissible time difference Δ_(M) is bigger then e.g. half ofa packet or frame. If yes, a resynchronization as in step 10 isperformed but then afterwards all the counters C₁ till C₄ are reset 14by e.g. dividing their value by four. In the other case, the reset ofthe counters 14, as said before, are performed directly.

[0039] The predefined value N_(max) defines the period during which thecounters are calculated. It measures the number of packets or framestreated. At the end of that period, if no action was taken, then astable operating state is attained. The counters are no more reset butonly divided by some amount e.g. by four to obtain a smoothing effect.

[0040] Generally, the threshold S₁ is much bigger then S₃ or S₄. Thisimplies that the reaction time is much shorter for increasing the buffersize B_(s) than to diminish it. This is related to the wish to reactrapidly to some degradation in the transfer of the data stream over thepacket-switched network. On the other hand, a reaction must not be sofast when an improvement is noticed. Indeed, a to big reduction of thebuffer size must be avoided after a short improvement since this wouldlead, later on, to some lost of data. Indeed, if the buffer size B_(s)will be to strongly shorten, not enough time will be left between theemptying of that buffer and the receiving of new packets ending up bythe lost of latter packets.

[0041] In the above example according to the present invention, up toseven parameters must be set before starting: Δ₁, Δ₂, S₁, S₂, S₃, S₄,N_(max). Occasionally, also B_(s) must be set, if the procedure shallstart with a non-zero buffer size. The value of all these parameters areobtained by some experiment and depending on the used packet-switchednetwork. The aim is to find values such that on one side only a minimalsupplementary delay (jitter) is tolerated and on the other side a lostof data is kept to a minimum (e.g. a lost of ˜2% of data is not heardwith a G.723 compression). The QoS during communication when usingpresent method of an auto-adaptive buffering is noticeable increased incomparison to the use of fixed buffer, and kept at that high level evenin a case of bad transfer situation thanks to this auto-adaptive buffer.

[0042] The above example does not exclude a method according to thepresent invention having different predefined criteria as the above onei.e. different parameters to set for the test of the size of the bufferB_(s).

1. Method of buffering a data stream at its reception, said data streambeing transferred from a sender to a receiver over a connection-lessnetwork in packets encapsulated into frames, the method comprising thesteps of: storing said packets into a buffer of a specific size (B_(s)),and characterized in that said method comprises the supplementary stepsof: measuring the delay (jitter) of at least one of said packets,performing a comparison between said measured and a predefined delay,depending on the result of the previous step, adapting dynamically saidbuffer size (B_(s)) such to optimize said transfer of said packetsaccording to some predefined criteria.
 2. Method according to claim 1,characterized in that in said step where a comparison is performed, ameasured time difference (ΔT) between the real time and the expected onefor said transfer of said packet is compared with a maximum admissibletime difference (Δ_(M)) which corresponds to said buffer size (B_(s)).3. Method according to claim 2, characterized in that it comprises afurther step each time such comparison is performed of affecting itsresult to one of different cases according to said predefined criteriasuch to weight said different cases (C_(i)) relatively to the number oftime a result of said comparison was affected to one of said cases. 4.Method according to claim 3, characterized in that it comprises afurther step of comparing the obtained weights (C_(i)) withcorresponding predefined one (S_(i)).
 5. Method according to claim 4,characterized in that it comprises a further step of taking an action onthe size of the buffer (B_(s)) when a calculated weight (C_(i)) exceedsthe corresponding predefined one (S_(i)).
 6. Method according to claim5, characterized in that in said predefined criteria at least threedifferent cases are defined, a first one (i) corresponding to thesituation that said measured time difference (ΔT) is noticeably lessthan said maximum admissible time (Δ_(M)), a second one (ii)corresponding to the situation that both are of same amplitude, and athird one (iii) corresponding to the situation that said measured timedifference (ΔT) is noticeably greater then said maximum admissible time(Δ_(M)).
 7. Method according to claim 6, characterized in that saidaction corresponds in said first case (i) or said third case (iii)respectively to lower or to increase the buffer size (B_(s)) of someamount.
 8. Method according to claim 6, characterized in that saidaction corresponds in said second case (ii) to resynchronize togetherthe clock of both sender and receiver such that in a same interval oftime, a same amount of data is at least approximately transmitted bysaid sender as received by said receiver.
 9. Method according to claim1, characterized in that when adapting dynamically said buffer size(B_(s)), its size is changed such that at least more than two sizes canbe chosen or the change is made continuously in steps of a minimum size.10. Method according to claim 9, characterized in that said minimum sizebeing defined by the minimum resolution of said buffer.